<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>定义组件-3</title>
		<script src="vue.js"></script>
	</head>

	<body>
		<div id="app">
			<p>{{perTitle}}</p>
			<br />
			<my-component v-bind:mytitle='perTitle'></my-component>
		</div>
	</body>
	<script>
		Vue.component('my-conponent', {
			props: ['mytitle'],
			template: "<div>接受父组件传递的信息为：{{mytitle}}</div>"
		})

		var vm = new Vue({
			el: "#app",
			data: {
				perTitle: "我是父类信息",
			}
		})
		//如何将根元素当中的变量值传递到组件当中
	</script>

</html>